CISC 1110 Lab 9
Write three functions.
The first function, called info, takes no parameters and returns no value. It simply prints “Waiting for the ” on the screen and does NOT go to a new line after printing.
The second function, called name_it, takes two integer parameters, which it calls train1 and train2. Each parameter is the number of a train (1, 2, 3, 4, 5, 6, or 7). It prints the larger of the two numbers and goes to a new line. It does not return a value.
The third function, called call_train, takes a single integer parameter which it calls n. The function uses n to control a loop. It prints “Here, train!” n times. So if the parameter n has the value 3, the function prints the message three times.
Write a complete main program calls these functions. In main, do not read in any values. Send two integers (variables or literals) as parameters to name_it, and send another integer as a parameter to call_train. Put the functions after the main program. Include prototypes for each of these functions. Save and run the program.
Sample output: (this assumes the parameters to name_it are 2 and 5, and the parameter to call_train is 3)
Waiting for the 5
Here, train!
Here, train!
Here, train!